#pragma once
#include <QColor>

#include "core.h"

/// <summary>
/// Style管理类，必须在主线程中使用！
/// </summary>

class ResourceHolder;
class S_CORE_EXPORT StyleMgr {
 public:
  enum class StyleType { kDefault, kBlue };

  static StyleMgr& instance();

  StyleType getColorStyle();
  QColor color(const QString& crName);
  int size(const QString& sizeName);
  void changeStyle(StyleType style);
  QString appStyleSheet();
  QColor BlendColor(QColor src, QColor dest, unsigned char alpha);

 private:
  StyleMgr();

 private:
  StyleType m_style = StyleType::kDefault;
  ResourceHolder* m_res = nullptr;
};

#define NAME_COLOR(clr) StyleMgr::instance().color(clr)
